{literal}
<script type="text/javascript">

function CheckAll(sForm, sElems, stat){
    var oForm = document.getElementById(sForm);
    var aCheckBox = document.getElementsByName(sElems);
    for (i=0; i<oForm.elements.length;i++){
        if ( oForm.elements[i].type == "checkbox" ){
            oForm.elements[i].checked = stat;
        }
    }
}

</script>
{/literal}

{if $bIsDeleted}
<div class="message_info" style="font-size:10pt;">
	{language text='Mod_Video.admin_videos_deleted'}
	<br />
	<br />
</div>
{/if}

{if $sDoApprove}
<div class="message_info" style="font-size:10pt;">
	{language text='Mod_Video.admin_videos_approved'}
	<br />
	<br />
</div>
{/if}

<form method="post" action="{url link='current'}" id="Video_form">
<table  class=forumline cellSpacing=0 width="100%" id="song_table">
<tr>
	<td class="row-header" colspan="8"><span>{language text='Mod_Video.videos_for_approval'}</span></td>
</tr>
{if count($aItems) > 0}
<tr>
	<th style="text-align:center;" class="row1">
		<input id="All_videos" type="checkbox" onclick="CheckAll('Video_form','sel_videos[]', document.getElementById('All_videos').checked);">
	</th>
	<th>
		{language text='Mod_Video.admin_head_type'}
	</th>
	<th>
		{language text='Mod_Video.admin_head_title'}
	</th>
	<th>
		{language text='Mod_Video.admin_head_from'}
	</th>
	<th>
		{language text='Mod_Video.admin_head_added'}
	</th>
	<th>
		{language text='Mod_Video.admin_head_actions'}
	</th>
</tr>
{foreach from=$aItems item=aItem}
<tr>
	<td class="row1" style="text-align:center;">
		<input type="checkbox" name="sel_videos[]" value="{$aItem.vid_id}" />
	</td>
	<td class="row1" style="text-align:center;">
		{if $aItem.vid_url}
		{language text='Mod_Video.admin_type_stream'}
		{else}
		{language text='Mod_Video.admin_type_uploaded'}
		{/if}
	</td>
	<td class="row1">
		{$aItem.vid_title|escape|truncate:'80'}
		<div style="text-align:center;">
		{img max_width="50" src="`$sGImageUrl`pending_`$aItem.vid_id`.jpg" src_def="design/pic/noimage_50.jpg" alt="" id="mainimage"}
		</div>
	</td>
	<td class="row1">
		<a href="{url link='public.user' name=$aItem.user}">{$aItem.user}</a>
	</td>
	<td class="row1" style="text-align:center;">
		{$aItem.vid_time|date_format:$sDateTimeFormat}
	</td>
	<td class="row1" style="text-align:center;">
		[ <a href="javascript:void(0);" onclick='window.open("{url link="admin.popup.video" id=$aItem.vid_id}", "video_Player", "width=460,height=360");'>{language text='Mod_Video.admin_view'}</a> ]
		[ <a href="{url link='admin.sections.video' avideo=$aItem.vid_id}">{language text='Mod_Video.admin_approve'}</a> ]
		[ <a href="{url link='admin.sections.video' dvideo=$aItem.vid_id}">{language text='Mod_Video.delete'}</a> ]
	</td>
</tr>
{/foreach}
<tr>
	<td colspan="6" align="left" class="catBottom">
		<input type="submit" value="{language text='Mod_Video.delete_selected'}" name="delete" />
		<input type="submit" value="{language text='Mod_Video.approve_selected'}" name="approve" />
	</td>
</tr>
{else}
<tr>
	<td>
	<div class="message_info" style="font-size:10pt;">
		{if $bApprovalSetting}
		{language text='Mod_Video.admin_no_videos_uploaded'}
		{else}
		{language text='Mod_Video.admin_approval_info'}
		{/if}
	</div>
	</td>
	</div>
</tr>
{/if}
</table>
</form>